<?php
/**
 * Created by PhpStorm.
 * User: xlosy
 * Date: 2018/3/28
 * Time: 23:11
 */

namespace app\index\model;


use think\Model;

class Res extends Model
{

    //自定义初始化
    protected function initialize()
    {
        //需要调用`Model`的`initialize`方法
        parent::initialize();
        //TODO:自定义的初始化
    }


    /**
     * 根据影片id查询关联资源
     */
    public function find_res_by_film_id($film_id){
        return Res::where(['film_id'=>$film_id])->select();
    }
}